package com.ruoyi.function.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.ZonedDateTime;

public class WeChatPaymentResponse {

    // 基础货币信息
    private String currency;
    @JsonProperty("payerCurrency")
    private String payerCurrency;
    @JsonProperty("payerTotal")
    private Integer payerTotal;
    private Integer total;

    // 冗余字段（驼峰式与蛇形命名）
    @JsonProperty("payer_currency")
    private String payerCurrencySnake;
    @JsonProperty("payer_total")
    private Integer payerTotalSnake;

    // 支付账号信息
    private String appid;
    private String attach;

    // 支付渠道信息
    @JsonProperty("bankType")
    private String bankType;
    private String mchid;

    // 订单信息
    @JsonProperty("outTradeNo")
    private String outTradeNo;
    private Payer payer;

    // 促销信息
    @JsonProperty("promotionDetail")
    private Object promotionDetail;

    // 时间信息（ISO 8601格式）
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
    private ZonedDateTime successTime;

    // 交易状态信息
    @JsonProperty("tradeState")
    private String tradeState;
    @JsonProperty("tradeStateDesc")
    private String tradeStateDesc;
    @JsonProperty("tradeType")
    private String tradeType;

    // 交易ID
    @JsonProperty("transactionId")
    private String transactionId;

    // 冗余字段（蛇形命名）
    @JsonProperty("bank_type")
    private String bankTypeSnake;
    @JsonProperty("out_trade_no")
    private String outTradeNoSnake;
    @JsonProperty("promotion_detail")
    private Object promotionDetailSnake;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXXX")
    @JsonProperty("success_time")
    private ZonedDateTime successTimeSnake;
    @JsonProperty("trade_state")
    private String tradeStateSnake;
    @JsonProperty("trade_state_desc")
    private String tradeStateDescSnake;
    @JsonProperty("trade_type")
    private String tradeTypeSnake;
    @JsonProperty("transaction_id")
    private String transactionIdSnake;

    // 嵌套的Payer类
    public static class Payer {
        private String openid;

        // Getters and Setters
        public String getOpenid() {
            return openid;
        }
        public void setOpenid(String openid) {
            this.openid = openid;
        }
    }

    // Getters and Setters（需补充完整）
    public String getCurrency() {
        return currency;
    }
    public void setCurrency(String currency) {
        this.currency = currency;
    }
    // 其他字段的Getter和Setter...
}
